﻿var hh5= "#fEffect/ItemEff/3012023/1/9#";//拟人化星星
var hh7= "#fEffect/ItemEff/3994441/8#";//小精灵
var status = -1;

function action(mode, type, selection) {
    if (mode == 1) {
        status++;
    } else {
        if (status == 0) {
            cm.sendOk("#e真的要放弃这次获取以下物品的机会了么?"+hh7+"\r\n#v2430209#* 3#v2049387#*3#v2049388#*1#v2614002#*10#v2049323#*100#v2430453#*5#v4021016#*3000#v3015440##v1143022##v5062402##v1003843##d+20全属性+15攻击力魔力属性点装#k\r\n#v2436383##g战力礼包V#k\r\n");
            cm.dispose();
        }
        status--;
    }
    if (status == 0) {
        cm.sendYesNo("#e#r#v2436382#战力礼包IV#k  (价值约2320余额)\r\n"+"打开该礼包,将获取#v2430209#* 3个,以及各类强大的道具祝您起飞!\r\n#v2049387#*3#v2049388#*1#v2614002#*10#v2049323#*100#v2430453#*5#v4021016#*3000\r\n#v3015440##v1143022##v5062402##v1003843##d+20全属性+15攻击力魔力属性点装#k\r\n#v2436383##g战力礼包V#k\r\n#r警告#k:一定要保持背包每栏至少留有#g15#k个空位哟,否则东西少了我是不负责的哟~\r\n\r\n是否花费#r1066#k余额打开该礼包？#k");
    } else if (status == 1) {
         if (cm.getHyPay(1)> 1066) {
 	cm.sendOk("恭喜你成功打开了战力礼包I,快去背包里查看把!");
        cm.addHyPay(1066);
        cm.gainItem(2436382, -1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2049387, 3);
        cm.gainItem(2049388, 1);
        cm.gainItem(2414002, 10);
        cm.gainItem(2049323, 100);
        cm.gainItem(4021016, 3000);
        cm.gainItem(2430453, 5);
        cm.gainItem(3015440, 1);
        cm.gainItem(1143022, 1);
        cm.gainItem(5062402, 1);
        cm.gainItem(1003843, 1);
        cm.gainItem(2436383, 1);
        cm.dispose();
       }
      else {             
       cm.sendOk(hh5+"\r\n#e您的#r余额#k不足哟~~是否考虑消费一下下来起飞呢?");
       cm.dispose();
        }
    }
}